//
//  ViewController.m
//  efairy
//
//  Created by XiangDongMBP on 2017/7/7.
//  Copyright © 2017年 East. All rights reserved.
//

#import "ViewController.h"
#import "TTRangeSlider.h"
#import "UIColor+XDHex.h"
#import "EFACalloutView.h"
#import "NSData+XDGZip.h"

@interface ViewController ()

//@property (weak, nonatomic) IBOutlet TTRangeSlider *rangeSlider;
@property (weak, nonatomic) IBOutlet UIDatePicker *datePicker;

@end

@implementation ViewController

#pragma mark - life cycle
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self initNavigationBar];
    [self initSubViews];
}

- (void)initNavigationBar {
    
}

- (void)initSubViews {
//    self.rangeSlider.handleImage = [UIImage imageNamed:@"device_slider"];
//    self.rangeSlider.selectedHandleDiameterMultiplier = 1.0;
//    self.rangeSlider.lineHeight = 20.0f;
//    self.rangeSlider.tintColorBetweenHandles = [UIColor xd_colorWithHex:0xbdeee3];
////    self.rangeSlider.backgroundColor = [UIColor whiteColor];
//    self.rangeSlider.tintColor = [UIColor whiteColor];
//    self.rangeSlider.minLabelColour = [UIColor grayColor];
//    self.rangeSlider.maxLabelColour = [UIColor grayColor];
////    self.rangeSlider.handleDiameter = 0;
    
    EFACalloutView *calloutView = [[EFACalloutView alloc] init];
    calloutView.titleLabel.text = @"电气火灾监控设备1";
    calloutView.subtitleLabel.text = @"在线";
    CGSize size = [calloutView sizeThatFits:CGSizeMake(CGFLOAT_MAX, 30)];
    NSLog(@"得到的size = %@", NSStringFromCGSize(size));
    calloutView.frame = CGRectMake(0, 0, size.width, size.height);
    calloutView.center = CGPointMake(200, 300);
    [self.view addSubview:calloutView];
    
//    NSIndexSet *indexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 7)];
//    NSLog(@"输出set = (%@)", indexes);
//    NSUInteger currentIndex = [indexes firstIndex];
//    NSUInteger i, count = [indexes count];
//    for (i = 0; i < count; i++) {
//        NSLog(@"输出的index = %ld", currentIndex);
//        currentIndex = [indexes indexGreaterThanIndex:currentIndex];
//    }
    
//    42955.41667;
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:42955.41667];
    NSLog(@"计算出来的date = %@", date);
    date = [NSDate dateWithTimeIntervalSince1970:429554166.7];
    NSLog(@"计算出来的date2 = %@", date);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - delegate
#pragma mark - event response
#pragma mark - private methods
#pragma mark - network request
#pragma mark - getters and setters


@end
